package com.zuma.oci.docker;

import com.zuma.oci.docker.configuration.DockerConfigurationMetadata;
import com.zuma.oci.docker.configuration.DockerConnectionConfiguration;
import com.zuma.oci.docker.transport.HttpTransport;
import com.zuma.oci.system.Environment;

import java.net.URI;

public class TestHttp {

    public static void main(String[] args) throws Exception {
        DockerConfigurationMetadata environmentConfiguration = DockerConfigurationMetadata.from(Environment.SYSTEM);

        var t = HttpTransport.create((DockerConnectionConfiguration) null) ;
        var r = t.get(URI.create("/images/json"));
        try (var is = r.getContent()) {
            System.out.println(new String(is.readAllBytes()));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
